#ifndef __FLY_CUDA_INFO_H__
#define __FLY_CUDA_INFO_H__

#include "cuda_runtime.h"

#include <cstddef>
#include <iostream>

int device_count();

struct Version
{
    int major;
    int minor;
};

std::ostream& operator<<(std::ostream& os, const Version& version);



Version get_driver_version();

Version get_runtime_version();

cudaDeviceProp get_device_prop(int device);

size_t get_global_memory_size(const cudaDeviceProp& prop);
size_t get_sm_number(const cudaDeviceProp& prop);
size_t get_shm_size_per_sm(const cudaDeviceProp& prop);
size_t get_register_size_per_sm(const cudaDeviceProp& prop);
size_t get_warp_size(const cudaDeviceProp& prop);
size_t get_max_threads_per_sm(const cudaDeviceProp& prop);
size_t get_max_threads_per_block(const cudaDeviceProp& prop);
size_t get_memory_band_width(const cudaDeviceProp& prop);

#endif // __FLY_CUDA_INFO_H__